Add MCP Registry Access Bindings UI (list, detail, create/edit)#292
Conversation
Implements the Access Bindings tab on the MCP Registry page (RHOAIENG-65778) with full list/card view toggle, search, and pagination, following the same patterns as the Servers tab. New components: - MCPAccessBindingCard — Card component with ConnectIcon, resolved display name, description, and version/alias badge - MCPAccessBindingCardGrid — uses shared PaginatedCardGrid - MCPAccessBindingListTable — table with copy-to-clipboard endpoint, linked server name, formatted transport type, and pagination Shared infrastructure extracted: - PaginatedCardGrid — generic grid with loading/empty/pagination, reused by both MCPServerCardGrid and MCPAccessBindingCardGrid - useCursorPaginatedQuery — generic pagination hook with localStorage page size, reused by both list query hooks - utils.ts — buildSearchFilterClause, formatTransportType, resolveVersionDisplayName, resolveBindingDisplayName, emptyCenterStyles, DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS Additional changes: - Access Bindings is now the default tab (was Servers) - MCPServerCard migrated to design system Card component - Delete cascade invalidation — mutations now invalidate binding queries - Query error display — versions/bindings errors shown as Alert - MCPServerAccessBindings uses formatTransportType for consistency Signed-off-by: Juntao Wang <juntwang@redhat.com>
… fixes - Add AccessBindingModal with create/edit modes, server/version/alias selection, and transport type configuration - Add MCPServerAccessBindings card-style binding display with edit/delete actions, transport tag, and clickable hover state using DS Card - Add useAccessBindingMutation hooks for create/update with cache invalidation - Add useSelectedMCPServerVersion hook for URL-driven version selection following the Prompts page pattern (?version= query param) - Update bindings table server links to deep-link to the correct version - Extract MCP_QUERY_KEYS constants to eliminate magic strings across hooks - Extract useInvalidateServerQueries to remove duplicate invalidation blocks - Add enabled option to useCursorPaginatedQuery for conditional fetching - Fix isEmptyState logic to use isServersEmpty for correct tab behavior - Fix unsafe error cast in AccessBindingModal - Type mutation generics to eliminate as Error casts - Replace hand-rolled BindingCard div with DS Card component - Add responsive column widths via flex metadata on bindings table - Add flexShrink: 0 on copy button to prevent squeeze by truncated text - Add 8 new tests covering version URL selection, binding links, and empty state edge cases (111 total) Signed-off-by: Juntao Wang <juntwang@redhat.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add MCPAccessBindingDetailPage with metadata grid, client config JSON, edit/delete modals, copy endpoint URL, and breadcrumb navigation - Add route, query hook, and delete mutation for binding detail - Add URL validation (isValidEndpointUrl) requiring http:// or https:// with inline error message on AccessBindingModal - Add description text on Access Bindings tab - Fix double-encoding of serverName by adding decodeURIComponent on useParams (matching model-registry pattern) - Fix MCPIcon.sizes type from string to string[] to match backend - Fix UpdateVersionStatusModal selectedStatus type safety - Fix delete binding missing SERVER and BINDING_DETAIL invalidation - Extract useInvalidateBindingQueries to reduce duplication - Add edit/delete binding support on server detail page binding cards with stopPropagation to prevent card navigation - Switch binding card grid to href-based navigation for right-click support - Align metadata grid label width to 120px across detail pages - Add created_by and last_updated_by fields to binding detail page - Add 4 test files: AccessBindingModal, MCPAccessBindingDetailPage, MCPServerAccessBindings, useCursorPaginatedQuery (142 total tests) Signed-off-by: Juntao Wang <juntwang@redhat.com>
38dafcd to
ab4b2d7
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: nananosirova The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
f25db61
into
opendatahub-io:mcp-registry-prototype
Related Issues/PRs
Relates to RHOAIENG-65778, RHOAIENG-65779
What changes are proposed in this pull request?
Implements the Access Bindings UI for the MCP Registry feature, including:
Access Bindings Tab (RHOAIENG-65778)
useCursorPaginatedQueryhook extracted from duplicate pagination logicPaginatedCardGridandCardIconWrappercomponentsCreate/Edit Access Binding Modal (RHOAIENG-65779)
http://orhttps://with inline error message@latestalias always shown in aliases groupAccess Binding Detail Page
ShowArtifactCodeSnippetAccessBindingModal, delete via overflow menu with confirmation?version=query param) following prompts page patternCode Quality & Bug Fixes
MCP_QUERY_KEYSconstants to eliminate magic strings across 5 hook filesuseInvalidateServerQueriesanduseInvalidateBindingQueriesto deduplicate cache invalidationdecodeURIComponentonuseParamsto prevent double-encoding (matching model-registry pattern)MCPIcon.sizestype fromstringtostring[]to match backendUpdateVersionStatusModalselectedStatus type safetyas Errorcastsenabledoption touseCursorPaginatedQueryfor conditional fetchingisEmptyStatelogic to correctly distinguish servers vs bindings empty statesaria-labelon delete binding button for accessibilityhref-based navigation for right-click "Open in new tab" supportScreen.Recording.2026-06-10.at.3.45.23.PM.mov
How is this PR tested?
142 tests across 13 suites, all passing. New test files:
AccessBindingModal.test.tsx(6 tests) — create/edit modes, URL validation, disabled statesMCPAccessBindingDetailPage.test.tsx(7 tests) — metadata, JSON config, loading/error, modals, breadcrumbMCPServerAccessBindings.test.tsx(6 tests) — card rendering, empty/loading/error, edit/delete callbacksuseCursorPaginatedQuery.test.tsx(5 tests) — pagination, filter reset, enabled flagDoes this PR require documentation update?
Does this PR require updating the MLflow Skills repository?
Release Notes
Is this a user-facing change?
Add Access Bindings UI to the MCP Registry — list/grid views with search and pagination, create/edit modal with URL validation, and detail page with metadata and client configuration.
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverHow should the PR be classified in the release notes? Choose one:
rn/feature- A new user-facing feature worth mentioning in the release notesIs this PR a critical bugfix or security fix that should go into the next patch release?